package com.mxpio.erp.common.quality.entity;

import com.mxpio.erp.common.technology.entity.Item;
import com.mxpio.erp.common.technology.entity.ItemGroup;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_QUALITY_IS_CHAIN")
@Schema(description="物料检测方案关系")
public class InspectionSchemeChain extends BaseEntity {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(name = "ID_", updatable = false)
	@Generator
	@Schema(description = "ID")
	private String id;
	
	@Column(name = "SCHEME_CODE_")
	@Schema(description = "检测方案编号")
	private String schemeCode;
	
	@Column(name = "ITEM_CODE_")
	@Schema(description = "物料（组）编码")
	private String itemCode;

	@Column(name = "DATA_SCOPE_")
	@Schema(description = "数据范围")//1物料、2物料组
	@Dict(dicCode = "ERP_QUAL_IS_CHAIN_DATA_SCOPE")
	private String dataScope;//

	@Column(name = "BUSI_TYPE_")
	@Schema(description = "检测方案业务类型")
	@Dict(dicCode = "ERP_QUAL_IS_BUSI_TYPE")
	private String busiType;
	/*@Column(name = "IN_QUALITY_CONTROL_")
	@Schema(description = "是否检验")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String inQualityControl;
	
	@Column(name = "DEFAULT_SUPPLY_")
	@Schema(description = "是否默认")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String defaultSupply;
	
	@Column(name = "HOLD_")
	@Schema(description = "是否冻结")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String hold;*/
	
	@Transient
	private Item item;
	@Transient
	private ItemGroup itemGroup;
	@Transient
	private InspectionScheme inspectionScheme;
	
}
